﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Untitled Document</title>
<link href="<%=path%>/css/style_main.css" rel="stylesheet" type="text/css" />
<link href="<%=path%>/css/BackStyle.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="<%=path%>/css/ajaxtabs.css" />
<script language="JavaScript" src="<%=path%>/js/FusionCharts.js"></script>

<script type="text/javascript">
function startTime()
{
var today=new Date()
var y = today.getYear();
var M = today.getMonth()+1;
var d = today.getDate();
var h=today.getHours()
var m=today.getMinutes()
var s=today.getSeconds()
// add a zero in front of numbers<10
m=checkTime(m)
s=checkTime(s)
document.getElementById('button5').value=y+"-"+M+"-"+d+" "+h+":"+m+":"+s
t=setTimeout('startTime()',500)
}

function checkTime(i)
{
if (i<10) 
  {i="0" + i}
  return i
}
</script>
</head>

<body onload="startTime()">
<div class="box">
<ul id="woaicsstitle" class="shadetabs">
<li><a href="<%=path %>/realtime_data.do?method=getMachineRealStaut">机床状态表</a></li>
<li><a href="<%=path %>/realtime_data.do?method=findMachineIndex">机床指标表</a></li>
<li class="selected"><a href="<%=path %>/realtime_data.do?method=getMachineRealTimeLine">指标动态曲线</a></li>
<li><a href="<%=path %>/html/monitor/monitor_right4.jsp">机床布局图</a></li>
</ul>

<div  class="contentstyle">
 <form action="<%=path %>/realtime_data.do?method=getMachineRealTimeLine" method="post" style="margin:0px; padding:0px;">
  <table cellspacing="0" cellpadding="0" width="100%" bgcolor="#8ECAEB" 
            border="0">
    <tbody>
      <tr bgcolor="#e2e0d3">
        <td bgcolor="#8ECAEB"><table width="100%" border="0" cellspacing="1" cellpadding="3">
            <tr>
              <td width="20%" align="right" bgcolor="#e6f0f8"><select name="indexconfig" class="s8" id="select2">
              <c:forEach items="${indexs}" var="cfg">
              	<option value="${cfg.indexName }"  ${(cfg.indexName eq indexconfig)?'selected':'' }>${cfg.indexName }</option>
              </c:forEach>
                  
              </select></td>
              <td align="left" bgcolor="#FFFFFF"><input name="button4" type="submit" class="s8" id="button5" value="" /></td>
            </tr>
        </table></td>
      </tr>
      <tr bgcolor="#e2e0d3">
        <td bgcolor="#8ECAEB"><table width="100%" border="0" cellspacing="1" cellpadding="3">
            <tr>
              <td align="center" bgcolor="#FFFFFF"><div id="chartdiv" align="center"></td>
            </tr>
        </table></td>
      </tr>
      <tr bgcolor="#e2e0d3">
        <td bgcolor="#DAEDF8"><table cellspacing="5" cellpadding="0" width="100%" border="0">
            <tbody>
              <tr>
                <td height="20" align="center"><!--  a href="#" onfocus="this.blur()"><img src="<%=path%>/img/table/output.gif" width="60" height="20" border="0" /></a> <a href="#" onfocus="this.blur()"><img src="<%=path%>/img/table/close.gif" width="60" height="20" border="0" /></a>--></td>
              </tr>
            </tbody>
        </table></td>
      </tr>
    </tbody>
  </table>
</form>
</div>
</div>
</body>
<script type="text/javascript">
 	 var myChart = new FusionCharts("RealTimeLine.swf", "myChartId", "650", "420", "0", "0");
 	 myChart.setDataXML("${xml}");
	 myChart.render("chartdiv");
    </script>
</html>
